# -*- coding:utf-8 -*-
from flask import jsonify


def success(data=None, msg='执行成功！', code=200):
    return jsonify({'data': data, 'msg': msg, 'code': code})


def fail(data=None, msg='执行失败！', code=400):
    return success(data=data, msg=msg, code=code)
